<!DOCTYPE html>
<html lang="zh">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <title>车间管理</title>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="default">
    <script type="text/javascript" src="/statics/js/custom/base.js"></script>
    <link rel="stylesheet" href="/statics/plugins/select2/select2.min.css?_V=1">
    <style>
        .select2-container {
            width: 100% !important;
            z-index: 9999;
        }
    </style>
</head>

<body>
<div class="container-fluid">
    <!--分配管理员-->
    <div class="modal fade bs-example-modal-lg" id="giveAdminUser" tabindex="-1" role="dialog"
         aria-labelledby="myLargeModalLabel" data-backdrop="static">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title">分配管理员</h4>
                    <div class="float-right">
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                    </div>
                </div>
                <div class="modal-body">
                    <form action="" id="giveAdminUserForm">
                        <div class="mb-3 col-md-12">
                            <input type="hidden" name="workshopId" id="workshopId" value="">
                        </div>
                        <div class="mb-3 col-md-12 mx_validator">
                            <label for="userId" class="form-label">选择管理员</label>
                            <select class="form-control select-init userIdSelect mx_required"
                                    mx_required_type="select" mx_required_msg="选择管理员"
                                    name="ids" id="userId" multiple="multiple">
                            </select>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-bs-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary mx_validator_button"
                            id="giveAdminUserSubmit">保存
                    </button>
                </div>
            </div>
        </div>
    </div>

    <!--添加-->
    <div class="modal fade bs-example-modal-lg" id="commonDiv" tabindex="-1" role="dialog"
         aria-labelledby="myLargeModalLabel" data-backdrop="static">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h6 class="modal-title" id="commonDivAdd">添加</h6>
                    <div class="float-right">
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                    </div>
                </div>
                <div class="modal-body">
                    <form action="" id="commonForm">
                        <div class="mb-3 col-md-12">
                            <input type="hidden" name="id" value="">
                            <input type="hidden" name="lastModifyTime" value="">
                        </div>
                        <div class="mb-3 col-md-12 mx_validator">
                            <label for="name" class="form-label">车间名称</label>
                            <span class="required">* </span>
                            <input type="text" class="form-control mx_required mx_custom"
                                   mx_required_msg="车间名称不能为空" id="name" name="name" value=""
                                   placeholder="请输入车间名称"/>
                        </div>
                        <div class="mb-3 col-md-12 mx_validator">
                            <label for="manager" class="form-label">负责人</label>
                            <input type="text" class="form-control mx_custom"
                                   mx_required_msg="" id="manager" name="manager" value=""
                                   placeholder="请输入负责人"/>
                        </div>
                        <div class="mb-3 col-md-12 mx_validator">
                            <label for="remark" class="form-label">备注</label>
                            <textarea class="form-control mx_custom"
                                      mx_required_msg="" id="remark" name="remark"
                                      placeholder="请输入备注"></textarea>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-bs-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary mx_validator_button" id="submit">保存
                    </button>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-body pt-0">
                    <header class="card-header px-0">
                        <div class="card-title">车间管理</div>
                    </header>
                    <div class="py-sm-3 mt-2 d-flex justify-content-between align-items-center">
                        <form id="searchForm" method="post">
                            <div class="row row-cols-lg-auto g-3 align-items-center">
                                <div class="col-12 my-0">
                                    <input class="form-control" type="text" name="name"
                                           placeholder="请输入车间名称..">
                                </div>
                                <div class="col-12 my-0">
                                    <input class="form-control" type="text" name="manager"
                                           placeholder="请输入负责人..">
                                </div>
                                <a class="btn btn-primary my-0 mx-2" id="searchButton"><i class="mdi mdi-magnify"></i>
                                    搜索</a>
                                <a class="btn btn-secondary my-0 mx-2" id="resetButton"><i class="mdi mdi-delete"></i>
                                    重置查询</a>
                            </div>
                        </form>
                        <div class="row row-cols-lg-auto g-3 align-items-center">
                            <a class="btn btn-primary my-0 mx-2 creates" data-bs-toggle="modal"
                               data-bs-target="#commonDiv" href="#!"><i class="mdi mdi-plus"></i> 新增</a>
                        </div>
                    </div>
                    <table id="tableAjaxId"></table>
                </div>
            </div>
        </div>
    </div>

</div>

<script type="text/javascript" src="/statics/js/apis/workshop/workshop.js"></script>
<script type="text/javascript" src="/statics/js/apis/user.js"></script>
<script type="text/javascript" src="/statics/js/custom/table.js?_v=1.1"></script>
<script type="text/javascript" src="/statics/js/custom/select.js?_v=1"></script>
<script type="text/javascript" src="/statics/plugins/select2/select2.min.js?_v=1"></script>
<script type="text/javascript" src="/statics/js/library/workshop/list.js"></script>
</body>
</html>
